import { createStore } from 'vuex'

const store = createStore({
	strict: true,
	state: {
		navBarHeight: 0,
		token: uni.getStorageSync("token")||'',
		uid: uni.getStorageSync("uid")||'',
	},
	mutations: {
		setNavBarHeight(state, height){
			state.navBarHeight = height;
		},
		setUserInfo(state, {token, uid}) {
			state.token = token;
			state.uid = uid;
		}
	}
})

export default store;